package org.example.service.impl;


import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.Date;
import java.util.List;
import org.example.entity.ThirdDeduct;
import org.example.mapper.ThirdDeductMapper;
import org.example.service.IThirdDeductService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 第三方划扣表 服务实现类
 * </p>
 *
 * @author libo
 * @since 2023-11-15
 */
@Service
@DS("ds0")
public class ThirdDeductServiceImpl extends ServiceImpl<ThirdDeductMapper, ThirdDeduct> implements
        IThirdDeductService {

    @Override
    public List<ThirdDeduct> getBySharding(int shardIndex, int shardTotal, String[] channels,
            List<Integer> types, List<Integer> deductStates, Date startTime, Date endTime) {
        return getBaseMapper().getBySharding(shardIndex, shardTotal, channels, types, deductStates,
                startTime, endTime);
    }

    @Transactional
    @Override
    public void saveTrans(ThirdDeduct thirdDeduct) {
        this.save(thirdDeduct);
        throw new RuntimeException("trans");
    }
}
